const Koa = require('koa')
const views = require('koa-views')
const jade = require('jade')
const static = require('koa-static')

const router = require('./routes/index')

const app = new Koa()

app.use(static(__dirname, './public'))

app.use(views(__dirname + '/views', {
    extension: 'jade'
}))

app.use(router.routes())
    .use(router.allowedMethods())

//启动服务，监听3000端口
app.listen(3000)